package com.xuecheng.media.service;

import com.aliyuncs.exceptions.ClientException;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xuecheng.commons.model.dto.MediaDto;
import com.xuecheng.commons.model.dto.MediaQueryDto;
import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.dto.VodUploadDto;
import com.xuecheng.commons.model.vo.MediaVo;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.commons.model.vo.VodUploadVo;
import com.xuecheng.media.domain.po.Media;

public interface MediaService extends IService<Media> {

    //获取上传凭证
    ResponseResult<VodUploadVo> vodToken(VodUploadDto dto);

    //刷新上传凭证
    ResponseResult<VodUploadVo> refreshVodToken(String videoId);

    //保存媒资
    ResponseResult saveMedia(MediaDto dto) throws ClientException;

    //媒资分页查询
    ResponseResult<MediaVo> findByPage(PageRequest pageRequest, MediaQueryDto dto);

    //媒资预览
    ResponseResult<String> preview(Long mediaId) throws ClientException;

    //媒资删除
    ResponseResult deleteMedia(Long mediaId) throws ClientException;

}
